package com.mt.roll.core.dal.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 设备表
 * </p>
 *
 * @author mt
 * @since 2022-03-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_equipment")
public class Equipment extends Model<Equipment> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
      @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 供应商ID
     */
    @TableField("supplier_id")
    private Long supplierId;

    /**
     * 设备类型
     */
    @TableField("equipment_type")
    private Long equipmentType;

    /**
     * 编码
     */
    @TableField("`code`")
    private String code;

    /**
     * 设备名称
     */
    @TableField("`name`")
    private String name;

    /**
     * 英文名称
     */
    @TableField("en_name")
    private String enName;

    /**
     * 缩写
     */
    @TableField("abbr")
    private String abbr;

    /**
     * 型号
     */
    @TableField("model")
    private String model;

    /**
     * 规格
     */
    @TableField("spec")
    private String spec;

    /**
     * 生产厂商
     */
    @TableField("manufacturer")
    private String manufacturer;

    /**
     * 产地
     */
    @TableField("production_place")
    private String productionPlace;

    /**
     * 生产批次编号
     */
    @TableField("production_batch_no")
    private String productionBatchNo;

    /**
     * 出厂编号
     */
    @TableField("production_no")
    private String productionNo;

    /**
     * 描述
     */
    @TableField("description")
    private String description;

    /**
     * 生产日期
     */
    @TableField("production_time")
    private LocalDateTime productionTime;

    /**
     * 购买日期
     */
    @TableField("purchase_time")
    private LocalDateTime purchaseTime;

    /**
     * 进厂日期
     */
    @TableField("enter_time")
    private LocalDateTime enterTime;

    /**
     * 调试日期
     */
    @TableField("debug_time")
    private LocalDateTime debugTime;

    /**
     * 投用日期
     */
    @TableField("used_time")
    private LocalDateTime usedTime;

    /**
     * 设备安装位置
     */
    @TableField("place")
    private String place;

    /**
     * 设备条码
     */
    @TableField("barcode")
    private String barcode;

    /**
     * 设备状态（关联 T_CONFIGURE_DISPLAY id）
     */
    @TableField("`status`")
    private Integer status;

    /**
     * 启用状态:0 、停用，1、启用
     */
    @TableField("enabled")
    private Integer enabled;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 删除标志，是否有效:1 可用 0不可用
     */
    @TableField("valid")
    @TableLogic
    private Integer valid;

    /**
     * 创建人
     */
    @TableField("creator_id")
    private Long creatorId;

    /**
     * 创建人姓名
     */
    @TableField("creator_name")
    private String creatorName;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 更新人
     */
    @TableField("updater_id")
    private Long updaterId;

    /**
     * 更新人姓名
     */
    @TableField("updater_name")
    private String updaterName;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 版本号
     */
    @TableField("version")
    @Version
    private Integer version;

    /**
     * 范围号
     */
    @TableField("range_number")
    private Integer rangeNumber;

    /**
     * 知识产权
     */
    @TableField("intellectual_property")
    private String intellectualProperty;

    /**
     * 稼动率
     */
    @TableField("activiation")
    private BigDecimal activiation;

    /**
     * 是否通讯
     */
    @TableField("communication")
    private Integer communication;

    /**
     * 调试周期(天)
     */
    @TableField("debug_period")
    private Integer debugPeriod;

    /**
     * E10状态
     */
    @TableField("e_status")
    private Integer eStatus;

    /**
     * 分组id （关联 T_EQUIPMENT_GROUP）
     */
    @TableField("group_id")
    private BigDecimal groupId;

    /**
     * IP
     */
    @TableField("ip")
    private String ip;

    /**
     * 端口号
     */
    @TableField("`port`")
    private BigDecimal port;

    /**
     * 设备区域
     */
    @TableField("equipment_area")
    private String equipmentArea;

    /**
     * 每腔加工数量
     */
    @TableField("processing_quantity_per_cavity")
    private BigDecimal processingQuantityPerCavity;

    /**
     * 腔体数量
     */
    @TableField("number_of_cavities")
    private BigDecimal numberOfCavities;

    /**
     * 控制状态，默认0；0代表本地，1代表远程
     */
    @TableField("control_status")
    private BigDecimal controlStatus;

    /**
     * 设备功能
     */
    @TableField("`function`")
    private String function;

    /**
     * PLC版本
     */
    @TableField("plc_version")
    private String plcVersion;

    /**
     * EAP版本
     */
    @TableField("eap_version")
    private String eapVersion;

    /**
     * 保养周期（年）
     */
    @TableField("maintenance_cycle")
    private BigDecimal maintenanceCycle;

    /**
     * 保养持续时间（小时）
     */
    @TableField("maintenance_time")
    private BigDecimal maintenanceTime;

    /**
     * 设备资料url，如果有多个资料 用逗号隔开。
     */
    @TableField("eq_data_url")
    private String eqDataUrl;

    /**
     * 设备图片url
     */
    @TableField("eq_img_url")
    private String eqImgUrl;

    /**
     * ERP Identification
     */
    @TableField("erp")
    private String erp;


    public static final String ID = "id";

    public static final String SUPPLIER_ID = "supplier_id";

    public static final String EQUIPMENT_TYPE = "equipment_type";

    public static final String CODE = "code";

    public static final String NAME = "name";

    public static final String EN_NAME = "en_name";

    public static final String ABBR = "abbr";

    public static final String MODEL = "model";

    public static final String SPEC = "spec";

    public static final String MANUFACTURER = "manufacturer";

    public static final String PRODUCTION_PLACE = "production_place";

    public static final String PRODUCTION_BATCH_NO = "production_batch_no";

    public static final String PRODUCTION_NO = "production_no";

    public static final String DESCRIPTION = "description";

    public static final String PRODUCTION_TIME = "production_time";

    public static final String PURCHASE_TIME = "purchase_time";

    public static final String ENTER_TIME = "enter_time";

    public static final String DEBUG_TIME = "debug_time";

    public static final String USED_TIME = "used_time";

    public static final String PLACE = "place";

    public static final String BARCODE = "barcode";

    public static final String STATUS = "status";

    public static final String ENABLED = "enabled";

    public static final String REMARK = "remark";

    public static final String VALID = "valid";

    public static final String CREATOR_ID = "creator_id";

    public static final String CREATOR_NAME = "creator_name";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATER_ID = "updater_id";

    public static final String UPDATER_NAME = "updater_name";

    public static final String UPDATE_TIME = "update_time";

    public static final String VERSION = "version";

    public static final String RANGE_NUMBER = "range_number";

    public static final String INTELLECTUAL_PROPERTY = "intellectual_property";

    public static final String ACTIVIATION = "activiation";

    public static final String COMMUNICATION = "communication";

    public static final String DEBUG_PERIOD = "debug_period";

    public static final String E_STATUS = "e_status";

    public static final String GROUP_ID = "group_id";

    public static final String IP = "ip";

    public static final String PORT = "port";

    public static final String EQUIPMENT_AREA = "equipment_area";

    public static final String PROCESSING_QUANTITY_PER_CAVITY = "processing_quantity_per_cavity";

    public static final String NUMBER_OF_CAVITIES = "number_of_cavities";

    public static final String CONTROL_STATUS = "control_status";

    public static final String FUNCTION = "function";

    public static final String PLC_VERSION = "plc_version";

    public static final String EAP_VERSION = "eap_version";

    public static final String MAINTENANCE_CYCLE = "maintenance_cycle";

    public static final String MAINTENANCE_TIME = "maintenance_time";

    public static final String EQ_DATA_URL = "eq_data_url";

    public static final String EQ_IMG_URL = "eq_img_url";

    public static final String ERP = "erp";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
